package org.elanfox.intellicommunity.common.ienum;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.elanfox.intellicommunity.common.ienum.base.CodeDescCommonEnum;

/**
 * @author allan
 * @version 1.0.0
 * @date 2021/3/22
 */
public interface CommonEnums {
    @AllArgsConstructor
    @Getter
    enum AreaDesc implements CodeDescCommonEnum {
        NEARBY(0, "附近"),
        RESPONSIBLE(1, "负责"),

        CURRENT(2, "当前区域"),
        CLOSEST(3, "近区域"),
        MIDDLE(4, "次近区域"),
        FARAWAY(5, "远区域");


        private final Integer code;
        private final String desc;

        public int type() {
            if (this.code == 0 || this.code == 1) {
                return 0;
            } else {
                return 1;
            }
        }
    }
}
